﻿'
' DKP for DotNetNuke® - http://dkpdnn.codeplex.com
' Copyright (c) 2008
' by Casey Lengacher ( http://dkpdnn.codeplex.com )
'
' DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation.
'
' Permission is hereby granted, free of charge, to any person obtaining a copy
' of this software and associated documentation files (the "Software"), to deal
' in the Software without restriction, including without limitation the rights
' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
' copies of the Software, and to permit persons to whom the Software is
' furnished to do so, subject to the following conditions:
'
' The above copyright notice and this permission notice shall be included in
' all copies or substantial portions of the Software.
'
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
' SOFTWARE.
'

Imports DotNetNuke.Common.Utilities

Namespace DotNetNuke.Modules.tss_DKP

    Public Class tss_DataController

#Region "Board Methods"

        Public Function tss_GetBoard(ByVal BoardID As Integer) As tss_BoardInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetBoard(BoardID), GetType(tss_BoardInfo)), tss_BoardInfo)
        End Function
        Public Function tss_GetBoards(ByVal PortalID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetBoards(PortalID), GetType(tss_BoardInfo))
        End Function
        Public Function tss_GetBoardsByPage(ByVal PortalID As Integer, _
                                            ByVal PageNumber As Integer, _
                                            ByVal PageSize As Integer, _
                                            ByVal SortExpression As String, _
                                            ByVal SortDirection As String, _
                                            ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetBoardsByPage(PortalID, _
                                                                                      PageNumber, _
                                                                                      PageSize, _
                                                                                      SortExpression, _
                                                                                      SortDirection, _
                                                                                      RowsAffected), GetType(tss_BoardInfo))
        End Function
        Public Sub tss_DeleteBoard(ByVal BoardID As Integer)
            tss_DataProvider.Instance().tss_DeleteBoard(BoardID)
        End Sub
        Public Function tss_AddBoard(ByVal objBoard As tss_BoardInfo) As Integer
            Return CType(tss_DataProvider.Instance().tss_AddBoard(objBoard.BoardName, _
                                                                  objBoard.GameID, _
                                                                  objBoard.SystemID, _
                                                                  objBoard.GuildName, _
                                                                  objBoard.RegionName, _
                                                                  objBoard.RealmName, _
                                                                  objBoard.GoodAttendanceCutOff, _
                                                                  objBoard.BadAttendanceCutOff, _
                                                                  objBoard.PlayerSyncCutOff, _
                                                                  objBoard.PortalID), Integer)
        End Function
        Public Sub tss_UpdateBoard(ByVal objBoard As tss_BoardInfo)
            tss_DataProvider.Instance().tss_UpdateBoard(objBoard.BoardID, _
                                                        objBoard.BoardName, _
                                                        objBoard.GameID, _
                                                        objBoard.SystemID, _
                                                        objBoard.GuildName, _
                                                        objBoard.RegionName, _
                                                        objBoard.RealmName, _
                                                        objBoard.GoodAttendanceCutOff, _
                                                        objBoard.BadAttendanceCutOff, _
                                                        objBoard.PlayerSyncCutOff, _
                                                        objBoard.PortalID)
        End Sub

#End Region

#Region "Class Methods"

        Public Function tss_GetClasses(ByVal GameID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetClasses(GameID), GetType(tss_ClassInfo))
        End Function

#End Region

#Region "Drop Methods"

        Public Function tss_GetDrop(ByVal DropID As Integer) As tss_DropInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetDrop(DropID), GetType(tss_DropInfo)), tss_DropInfo)
        End Function
        Public Function tss_GetDropByMobIDItemID(ByVal MobID As Integer, _
                                                 ByVal ItemID As Integer) As tss_DropInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetDropByMobIdItemID(MobID, _
                                                                                             ItemID), GetType(tss_DropInfo)), tss_DropInfo)
        End Function
        Public Function tss_GetDrops(ByVal RaidID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetDrops(RaidID), GetType(tss_DropInfo))
        End Function
        Public Function tss_GetDropsByPage(ByVal MobID As Integer, _
                                           ByVal PageNumber As Integer, _
                                           ByVal PageSize As Integer, _
                                           ByVal SortExpression As String, _
                                           ByVal SortDirection As String, _
                                           ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetDropsByPage(MobID, _
                                                                                     PageNumber, _
                                                                                     PageSize, _
                                                                                     SortExpression, _
                                                                                     SortDirection, _
                                                                                     RowsAffected), GetType(tss_DropInfo))
        End Function
        Public Sub tss_DeleteDrop(ByVal DropID As Integer)
            tss_DataProvider.Instance().tss_DeleteDrop(DropID)
        End Sub
        Public Function tss_AddDrop(ByVal objDrop As tss_DropInfo) As Integer
            Return CType(tss_DataProvider.Instance().tss_AddDrop(objDrop.MobID, _
                                                                 objDrop.ItemID), Integer)
        End Function
        Public Sub tss_UpdateDrop(ByVal objDrop As tss_DropInfo)
            tss_DataProvider.Instance().tss_UpdateDrop(objDrop.DropID, _
                                                       objDrop.MobID, _
                                                       objDrop.ItemID)
        End Sub

#End Region

#Region "Game Methods"

        Public Function tss_GetGames() As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetGames(), GetType(tss_GameInfo))
        End Function

#End Region

#Region "Instance Methods"

        Public Function tss_GetInstance(ByVal InstanceID As Integer) As tss_InstanceInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetInstance(InstanceID), GetType(tss_InstanceInfo)), tss_InstanceInfo)
        End Function
        Public Function tss_GetInstanceByName(ByVal InstanceName As String, _
                                              ByVal BoardID As Integer) As tss_InstanceInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetInstanceByName(InstanceName, _
                                                                                          BoardID), GetType(tss_InstanceInfo)), tss_InstanceInfo)
        End Function
        Public Function tss_GetInstances(ByVal BoardID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetInstances(BoardID), GetType(tss_InstanceInfo))
        End Function
        Public Function tss_GetInstancesByPage(ByVal BoardID As Integer, _
                                               ByVal PageNumber As Integer, _
                                               ByVal PageSize As Integer, _
                                               ByVal SortExpression As String, _
                                               ByVal SortDirection As String, _
                                               ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetInstancesByPage(BoardID, _
                                                                                         PageNumber, _
                                                                                         PageSize, _
                                                                                         SortExpression, _
                                                                                         SortDirection, _
                                                                                         RowsAffected), GetType(tss_InstanceInfo))
        End Function
        Public Sub tss_DeleteInstance(ByVal InstanceID As Integer)
            tss_DataProvider.Instance().tss_DeleteInstance(InstanceID)
        End Sub
        Public Function tss_AddInstance(ByVal objInstance As tss_InstanceInfo) As Integer
            Return CType(tss_DataProvider.Instance().tss_AddInstance(objInstance.InstanceName, _
                                                                     objInstance.InstanceWowHeadID, _
                                                                     objInstance.InstanceHeroicFlag, _
                                                                     objInstance.BoardID), Integer)
        End Function
        Public Sub tss_UpdateInstance(ByVal objInstance As tss_InstanceInfo)
            tss_DataProvider.Instance().tss_UpdateInstance(objInstance.InstanceID, _
                                                           objInstance.InstanceName, _
                                                           objInstance.InstanceWowHeadID, _
                                                           objInstance.InstanceHeroicFlag)
        End Sub

#End Region

#Region "Item Methods"

        Public Function tss_GetItem(ByVal ItemID As Integer) As tss_ItemInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetItem(ItemID), GetType(tss_ItemInfo)), tss_ItemInfo)
        End Function
        Public Function tss_GetItemByName(ByVal ItemName As String, _
                                          ByVal BoardID As Integer) As tss_ItemInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetItemByName(ItemName, _
                                                                                      BoardID), GetType(tss_ItemInfo)), tss_ItemInfo)
        End Function
        Public Function tss_GetItems(ByVal BoardID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetItems(BoardID), GetType(tss_ItemInfo))
        End Function
        Public Function tss_GetItemsByPage(ByVal BoardID As Integer, _
                                           ByVal PageNumber As Integer, _
                                           ByVal PageSize As Integer, _
                                           ByVal SortExpression As String, _
                                           ByVal SortDirection As String, _
                                           ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetItemsByPage(BoardID, _
                                                                                     PageNumber, _
                                                                                     PageSize, _
                                                                                     SortExpression, _
                                                                                     SortDirection, _
                                                                                     RowsAffected), GetType(tss_ItemInfo))
        End Function
        Public Sub tss_DeleteItem(ByVal ItemID As Integer)
            tss_DataProvider.Instance().tss_DeleteItem(ItemID)
        End Sub
        Public Function tss_AddItem(ByVal objItem As tss_ItemInfo) As Integer
            Return CType(tss_DataProvider.Instance().tss_AddItem(objItem.ItemName, _
                                                                 objItem.ItemValue, _
                                                                 objItem.ItemPercent, _
                                                                 objItem.ItemWowHeadID, _
                                                                 objItem.BoardID), Integer)
        End Function
        Public Sub tss_UpdateItem(ByVal objItem As tss_ItemInfo)
            tss_DataProvider.Instance().tss_UpdateItem(objItem.ItemID, _
                                                       objItem.ItemName, _
                                                       objItem.ItemValue, _
                                                       objItem.ItemPercent, _
                                                       objItem.ItemWowHeadID)
        End Sub

#End Region

#Region "Level Methods"

        Public Function tss_GetLevels(ByVal GameID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetLevels(GameID), GetType(tss_LevelInfo))
        End Function

#End Region

#Region "Loot Methods"

        Public Function tss_GetLoot(ByVal LootID As Integer) As tss_LootInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetLoot(LootID), GetType(tss_LootInfo)), tss_LootInfo)
        End Function
        Public Function tss_GetLootsByPage(ByVal RaidID As Integer, _
                                           ByVal PageNumber As Integer, _
                                           ByVal PageSize As Integer, _
                                           ByVal SortExpression As String, _
                                           ByVal SortDirection As String, _
                                           ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetLootsByPage(RaidID, _
                                                                                     PageNumber, _
                                                                                     PageSize, _
                                                                                     SortExpression, _
                                                                                     SortDirection, _
                                                                                     RowsAffected), GetType(tss_LootInfo))
        End Function
        Public Function tss_GetLootsForPlayerByPage(ByVal PlayerID As Integer, _
                                                    ByVal PageNumber As Integer, _
                                                    ByVal PageSize As Integer, _
                                                    ByVal SortExpression As String, _
                                                    ByVal SortDirection As String, _
                                                    ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetLootsForPlayerByPage(PlayerID, _
                                                                                              PageNumber, _
                                                                                              PageSize, _
                                                                                              SortExpression, _
                                                                                              SortDirection, _
                                                                                              RowsAffected), GetType(tss_LootInfo))
        End Function
        Public Sub tss_DeleteLoot(ByVal LootID As Integer)
            tss_DataProvider.Instance().tss_DeleteLoot(LootID)
        End Sub
        Public Function tss_AddLoot(ByVal objLoot As tss_LootInfo) As Integer
            Return CType(tss_DataProvider.Instance().tss_AddLoot(objLoot.LootValue, _
                                                                 objLoot.RaidID, _
                                                                 objLoot.PlayerID, _
                                                                 objLoot.DropID), Integer)
        End Function
        Public Sub tss_UpdateLoot(ByVal objLoot As tss_LootInfo)
            tss_DataProvider.Instance().tss_UpdateLoot(objLoot.LootID, _
                                                       objLoot.LootValue, _
                                                       objLoot.RaidID, _
                                                       objLoot.PlayerID, _
                                                       objLoot.DropID)
        End Sub

#End Region

#Region "Mob Methods"

        Public Function tss_GetMob(ByVal MobID As Integer) As tss_MobInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetMob(MobID), GetType(tss_MobInfo)), tss_MobInfo)
        End Function
        Public Function tss_GetMobByName(ByVal MobName As String, _
                                         ByVal InstanceID As Integer) As tss_MobInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetMobByName(MobName, _
                                                                                     InstanceID), GetType(tss_MobInfo)), tss_MobInfo)
        End Function
        Public Function tss_GetMobs(ByVal BoardID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetMobs(BoardID), GetType(tss_MobInfo))
        End Function
        Public Function tss_GetMobsByPage(ByVal BoardID As Integer, _
                                          ByVal PageNumber As Integer, _
                                          ByVal PageSize As Integer, _
                                          ByVal SortExpression As String, _
                                          ByVal SortDirection As String, _
                                          ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetMobsByPage(BoardID, _
                                                                                    PageNumber, _
                                                                                    PageSize, _
                                                                                    SortExpression, _
                                                                                    SortDirection, _
                                                                                    RowsAffected), GetType(tss_MobInfo))
        End Function
        Public Sub tss_DeleteMob(ByVal MobID As Integer)
            tss_DataProvider.Instance().tss_DeleteMob(MobID)
        End Sub
        Public Function tss_AddMob(ByVal objMob As tss_MobInfo) As Integer
            Return CType(tss_DataProvider.Instance().tss_AddMob(objMob.MobName, _
                                                                objMob.MobValue, _
                                                                objMob.MobWowHeadID, _
                                                                objMob.MobHeroicFlag, _
                                                                objMob.MobAttendanceFlag, _
                                                                objMob.InstanceID), Integer)
        End Function
        Public Sub tss_UpdateMob(ByVal objMob As tss_MobInfo)
            tss_DataProvider.Instance().tss_UpdateMob(objMob.MobID, _
                                                      objMob.MobName, _
                                                      objMob.MobValue, _
                                                      objMob.MobWowHeadID, _
                                                      objMob.MobHeroicFlag, _
                                                      objMob.MobAttendanceFlag, _
                                                      objMob.InstanceID)
        End Sub

#End Region

#Region "Player Methods"

        Public Function tss_GetPlayer(ByVal PlayerID As Integer) As tss_PlayerInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetPlayer(PlayerID), GetType(tss_PlayerInfo)), tss_PlayerInfo)
        End Function
        Public Function tss_GetPlayerByName(ByVal PlayerName As String, _
                                            ByVal BoardID As Integer) As tss_PlayerInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetPlayerByName(PlayerName, _
                                                                                        BoardID), GetType(tss_PlayerInfo)), tss_PlayerInfo)
        End Function
        Public Function tss_GetPlayers(ByVal BoardID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetPlayers(BoardID), GetType(tss_PlayerInfo))
        End Function
        Public Function tss_GetPlayersByClass(ByVal PlayerClass As String, _
                                              ByVal BoardID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetPlayersByClass(PlayerClass, _
                                                                                        BoardID), GetType(tss_PlayerInfo))
        End Function
        Public Function tss_GetPlayersByRaid(ByVal RaidID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetPlayersByRaid(RaidID), GetType(tss_PlayerInfo))
        End Function
        Public Function tss_GetPlayersByPage(ByVal BoardID As Integer, _
                                             ByVal PageNumber As Integer, _
                                             ByVal PageSize As Integer, _
                                             ByVal SortExpression As String, _
                                             ByVal SortDirection As String, _
                                             ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetPlayersByPage(BoardID, _
                                                                                       PageNumber, _
                                                                                       PageSize, _
                                                                                       SortExpression, _
                                                                                       SortDirection, _
                                                                                       RowsAffected), GetType(tss_PlayerInfo))
        End Function
        Public Sub tss_DeletePlayer(ByVal PlayerID As Integer)
            tss_DataProvider.Instance().tss_DeletePlayer(PlayerID)
        End Sub
        Public Function tss_AddPlayer(ByVal objPlayer As tss_PlayerInfo) As Integer
            Return CType(tss_DataProvider.Instance().tss_AddPlayer(objPlayer.PlayerName, _
                                                                   objPlayer.PlayerRank, _
                                                                   objPlayer.PlayerClass, _
                                                                   objPlayer.PlayerRace, _
                                                                   objPlayer.PlayerLevel, _
                                                                   objPlayer.JoinDate, _
                                                                   objPlayer.BoardID), Integer)
        End Function
        Public Sub tss_UpdatePlayer(ByVal objPlayer As tss_PlayerInfo)
            tss_DataProvider.Instance().tss_UpdatePlayer(objPlayer.PlayerID, _
                                                         objPlayer.PlayerName, _
                                                         objPlayer.PlayerRank, _
                                                         objPlayer.PlayerClass, _
                                                         objPlayer.PlayerRace, _
                                                         objPlayer.PlayerLevel, objPlayer.JoinDate)
        End Sub

#End Region

#Region "Race Methods"

        Public Function tss_GetRaces(ByVal GameID As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetRaces(GameID), GetType(tss_RaceInfo))
        End Function

#End Region

#Region "Raid Methods"

        Public Function tss_GetRaid(ByVal RaidID As Integer) As tss_RaidInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetRaid(RaidID), GetType(tss_RaidInfo)), tss_RaidInfo)
        End Function
        Public Function tss_GetRaidsByPage(ByVal BoardID As Integer, _
                                           ByVal PageNumber As Integer, _
                                           ByVal PageSize As Integer, _
                                           ByVal SortExpression As String, _
                                           ByVal SortDirection As String, _
                                           ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetRaidsByPage(BoardID, _
                                                                                     PageNumber, _
                                                                                     PageSize, _
                                                                                     SortExpression, _
                                                                                     SortDirection, _
                                                                                     RowsAffected), GetType(tss_RaidInfo))
        End Function
        Public Function tss_GetRaidsForPlayerByPage(ByVal PlayerID As Integer, _
                                                    ByVal PageNumber As Integer, _
                                                    ByVal PageSize As Integer, _
                                                    ByVal SortExpression As String, _
                                                    ByVal SortDirection As String, _
                                                    ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetRaidsForPlayerByPage(PlayerID, _
                                                                                              PageNumber, _
                                                                                              PageSize, _
                                                                                              SortExpression, _
                                                                                              SortDirection, _
                                                                                              RowsAffected), GetType(tss_RaidInfo))
        End Function
        Public Sub tss_DeleteRaid(ByVal RaidID As Integer)
            tss_DataProvider.Instance().tss_DeleteRaid(RaidID)
        End Sub
        Public Function tss_AddRaid(ByVal objRaid As tss_RaidInfo) As Integer
            Return CType(tss_DataProvider.Instance().tss_AddRaid(objRaid.RaidValue, _
                                                                 objRaid.RaidDate, _
                                                                 objRaid.RaidAttendanceFlag, _
                                                                 objRaid.MobID), Integer)
        End Function
        Public Sub tss_UpdateRaid(ByVal objRaid As tss_RaidInfo)
            tss_DataProvider.Instance().tss_UpdateRaid(objRaid.RaidID, _
                                                       objRaid.RaidValue, _
                                                       objRaid.RaidDate, _
                                                       objRaid.RaidAttendanceFlag, _
                                                       objRaid.MobID)
        End Sub

#End Region

#Region "Roster Methods"

        Public Function tss_GetRoster(ByVal RosterID As Integer) As tss_RosterInfo
            Return CType(CBO.FillObject(tss_DataProvider.Instance().tss_GetRoster(RosterID), GetType(tss_RosterInfo)), tss_RosterInfo)
        End Function
        Public Function tss_GetRostersByPage(ByVal RaidID As Integer, _
                                             ByVal PageNumber As Integer, _
                                             ByVal PageSize As Integer, _
                                             ByVal SortExpression As String, _
                                             ByVal SortDirection As String, _
                                             ByRef RowsAffected As Integer) As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetRostersByPage(RaidID, _
                                                                                       PageNumber, _
                                                                                       PageSize, _
                                                                                       SortExpression, _
                                                                                       SortDirection, _
                                                                                       RowsAffected), GetType(tss_RosterInfo))
        End Function
        Public Sub tss_DeleteRoster(ByVal RosterID As Integer)
            tss_DataProvider.Instance().tss_DeleteRoster(RosterID)
        End Sub
        Public Function tss_AddRoster(ByVal objRoster As tss_RosterInfo) As Integer
            Return CType(tss_DataProvider.Instance().tss_AddRoster(objRoster.RaidID, _
                                                                   objRoster.PlayerID), Integer)
        End Function
        Public Sub tss_UpdateRoster(ByVal objRoster As tss_RosterInfo)
            tss_DataProvider.Instance().tss_UpdateRoster(objRoster.RosterID, _
                                                         objRoster.RaidID, _
                                                         objRoster.PlayerID)
        End Sub

#End Region

#Region "System Methods"

        Public Function tss_GetSystems() As ArrayList
            Return CBO.FillCollection(tss_DataProvider.Instance().tss_GetSystems(), GetType(tss_SystemInfo))
        End Function

#End Region

    End Class

End Namespace
